home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d6 / glazer.arc / INVINCOM.BAS < prev    next >
BASIC Source File  |  1988-10-07  |  1KB  |  27 lines

  1. 100 'Investment Income ("INVINCOME")
  2. 110 CLS
  3. 120 COLOR 0,15 : PRINT "Investment Income" : COLOR 15,0
  4. 130 DEFDBL A-Z
  5. 140 DEFINT M-N
  6. 150 MONEYFMT$ = "$$##,###,###.##"
  7. 160 PRINT : PRINT
  8. 170 PRINT "Do not enter dollar signs or commas"
  9. 180 PRINT
  10. 190 '     Let user enter data
  11. 200 INPUT "Purchase price of investment: ", PV
  12. 210 INPUT "Value of investment at end of term: ", FV
  13. 220 INPUT "Desired annual rate of return (in percent): ", AY
  14. 230 INPUT "Total number of periods: ", NPERIODS
  15. 240 INPUT "Number of income receipts per year: ", NPY
  16. 250 INPUT "Annual interest rate (in percent): ", AR
  17. 260 '     Convert annual rates to periodic rates
  18. 270 PR = (1 + AR / 100) ^ (1 / NPY) - 1
  19. 280 PY = (1 + AY / 100) ^ (1 / NPY) - 1
  20. 290 '     Find required present value of income
  21. 300 VALUEINCOME = (PV * (1 + PY) ^ NPERIODS - FV) * (1 + PR) ^ -NPERIODS
  22. 310 '     Find required periodic income
  23. 320 PMT = PR * VALUEINCOME / (1 - (1 + PR) ^ -NPERIODS)
  24. 330 PRINT
  25. 340 PRINT "Required periodic income: "; USING MONEYFMT$; PMT
  26. 350 END
  27.